package com.cloud.feign.consumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cloud.feign.consumer.entity.User;
import com.cloud.feign.consumer.service.IHelloService;
@RestController
@RequestMapping("/feignConsumerController")
public class FeignConsumerController {
	
	@Autowired
	private IHelloService helloService;
	@GetMapping("/sayHelloWorld")
	public String sayHelloWorld(){
		return helloService.sayHelloWorld();
	}
	@GetMapping("/hello")
	public String hello(){
		StringBuilder sb=new StringBuilder(10);
		sb.append(helloService.hello1("fc")).append("\n")
			.append(helloService.hello2("fc", 28)).append("\n")
			.append(helloService.hello3(new User("fc",28))).append("\n");
		return sb.toString();
	}
}
